package com.masterclient.app.modules.brand.grass;

import android.os.Handler;

import com.eoner.baselibrary.bean.brand.BrandGrassSpecInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * created by wujin on 2021/5/2
 */
public class BrandGrassSpecialPresenter extends BrandGrassSpecialContract.Presenter {

    private int page;

    @Override
    public void requestData(int page) {
        this.page = page;
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mView.loadSuccess(getTestData());
            }
        }, 800);
    }

    private List<BrandGrassSpecInfo> getTestData() {
        // TODO 测试数据
        if (page >= 3) {
            return new ArrayList<>();
        }
        List<BrandGrassSpecInfo> data = new ArrayList<>();
        BrandGrassSpecInfo info = new BrandGrassSpecInfo("", "明星同款 兰蔻全新美丽人生香水", "http://image.gongzhugou.com/data/public/201909/20190924/2019092411295353130.jpg?x-oss-process=image/resize,m_fixed,w_800");
        data.add(info);
        info = new BrandGrassSpecInfo("", "明星同款 兰蔻全新美丽人生香水", "http://image.gongzhugou.com/data/public/201909/20190924/2019092411295495103.jpg?x-oss-process=image/resize,m_fixed,w_800");
        data.add(info);
        info = new BrandGrassSpecInfo("", "明星同款 兰蔻全新美丽人生香水", "http://image.gongzhugou.com/data/public/201909/20190924/2019092411295474536.jpg?x-oss-process=image/resize,m_fixed,w_800");
        data.add(info);
        info = new BrandGrassSpecInfo("", "明星同款 兰蔻全新美丽人生香水", "http://image.gongzhugou.com/data/public/201909/20190924/2019092411295474536.jpg?x-oss-process=image/resize,m_fixed,w_800");
        data.add(info);
        info = new BrandGrassSpecInfo("", "明星同款 兰蔻全新美丽人生香水", "http://image.gongzhugou.com/data/public/201909/20190924/2019092411295474536.jpg?x-oss-process=image/resize,m_fixed,w_800");
        data.add(info);
        return data;
    }
}
